<%--                                                                       --%>
<%-- Copyright (c) 2004-2005 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el" %>

<%!
  private static final String INDENT = "&nbsp;&nbsp;&nbsp;&nbsp;";
%>
<%--
------------------Requirement----------------
Caller page should put the criteria condition list into request scope with
the following name: conditionList.
--%>


      <table class="dataTable" border="0" cellspacing="1" cellpadding="2" summary="<bean-el:message key="em.segment.view.page.subtitle.2" bundle="em"/>" width="100%">
        <tr class="listHeader">
          <bean-el:size id="conditionListSize" name="conditionList" />
          <c:choose>
            <c:when test="${conditionListSize <= 1}">
              <th align="center">
                <bean-el:message bundle="em" key="em.segment.criteria.no" />
              </th>
            </c:when>
            <c:otherwise>
              <c:forEach var="condition" items="${conditionList}" begin="0" end="0">
                <c:set var="rootNodeLevel" value="${condition.level}" />
                <th align="left">
                  <c:out escapeXml="false" value="${condition.friendlyDescription}" />
                </th>
              </c:forEach>
            </c:otherwise>
          </c:choose>
        </tr>

        <c:forEach var="condition" items="${conditionList}" begin="1" varStatus="index">
          <c:set var="rowStyle">
            <c:choose>
              <c:when test="${condition.level % 2 == 0}">
                listEven
              </c:when>
              <c:otherwise>
                listOdd
              </c:otherwise>
            </c:choose>
          </c:set>
          <tr class="<c:out value="${rowStyle}" />" >
            <td align="left">
              <c:forEach begin="0" end="${condition.level - rootNodeLevel - 1}">
                <%=INDENT%>
              </c:forEach>
              <c:out escapeXml="false" value="${condition.friendlyDescription}" />
            </td>
          </tr>
        </c:forEach>
      </table>
